package org.teamswift.crow.rbac.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.teamswift.crow.rbac.security.CrowSecurityInterceptor;

@Configuration
public class CrowRbacMainConfigure implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CrowSecurityInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/crow/rbac/session")
        ;
    }
}
